package cn.iocoder.yudao.module.study.example.propertiesDemo.controller.admin;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.study.example.propertiesDemo.properties.YudaoStudyProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
/**
 * @Author cjc
 * @Date 2024/5/23 10:33
 * @Description: Properties Test
 * @Version 1.0
 */
@RestController
@RequestMapping("properties")
public class YudaoStudyPropertiesController {

    @Resource
    private YudaoStudyProperties yudaoStudyProperties;

    @GetMapping("test1")
    public CommonResult<String> test(){
        Boolean enable = yudaoStudyProperties.getEnable();
        String username = yudaoStudyProperties.getUsername();
        Long mobile = yudaoStudyProperties.getMobile();
        System.out.println(enable);
        System.out.println(username);
        System.out.println(mobile);
        return success(username);
    }
}
